package com.jflyfox.component.handler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.jfinal.handler.Handler;
import com.jfinal.kit.StrKit;

/**
 * 2016年11月20日 20:00:37
 * 如果请求的是ueditor的html文件，就交给容器处理
 * 
 * @author zempty
 *
 */
public class UeditorHandler extends Handler {

	@Override
	public void handle(String target, HttpServletRequest request, HttpServletResponse response, boolean[] isHandled) {
		String uri = request.getRequestURI();
		
		if (StrKit.notBlank(uri)) {
			if (uri.contains("ueditor") && uri.endsWith(".html")) {
				isHandled[0] = false; //交给容器处理
				return;
			}
		}
		next.handle(target, request, response, isHandled);
	}

}
